import { pubRequire } from '@utils/public'
const base = '/activities/recommends-reward'

// 获取邀请记录提现列表
export function getwithdrawList(params, callBack, errBack) {
  return pubRequire('get', `${base}`, params, callBack, errBack)
}

// 获取全部活动
export function getAllActivity(params, callBack, errBack) {
  return pubRequire('get', `${base}/options`, params, callBack, errBack)
}

// 获取提现记录明细
export function getwithdrawDetail(params, callBack, errBack) {
  return pubRequire(
    'get',
    `${base}/withdrawals/${params.activityId}/users/${params.userId}`,
    '',
    callBack,
    errBack
  )
}

// 导出邀请提现信息
export function exportData(params, callBack, errBack) {
  return pubRequire('get', `${base}/export`, params, callBack, errBack)
}

// 提现
export function setWithdraw(id, params, callBack, errBack) {
  return pubRequire(
    'post',
    `${base}/withdrawals/${id}`,
    params,
    callBack,
    errBack
  )
}
